home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_item_candle.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
124 lines
# Jones 3D Cog Script
#
# item_Candle.cog
#
# [RT]
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ===================================================================
symbols
message startup
message activated
message touched
message taken
cog talkCog local
sound foundSnd1=inxj173.wav local
sound foundSnd2=rv04j02.wav local
thing player local
thing sender local
int bin=0 local
end
# ===================================================================
code
startup:
global10 = 0;
return;
# -------------------------------------------------------------------
activated:
StartCutscene(0);
talkCog = GetCogByIndex(0);
SendMessage(talkCog, 27);
if (Rand() < 0.5)
{
SetExtCamOffset('0.15 -0.05 0.04');
}
else
{
SetExtCamOffset('-0.15 -0.05 0.04');
}
SetExtCamLookOffset('0.0 0.02 -0.01');
return;
# -------------------------------------------------------------------
touched:
sender = GetSenderRef();
player = GetSourceRef();
# Find out which candle we're picking up...
if (IsThingModelName(sender, "riv_cndl_awind.3do"))
bin = 88;
else if (IsThingModelName(sender, "riv_cndl_bwind.3do"))
bin = 89;
else if (IsThingModelName(sender, "riv_cndl_cwind.3do"))
bin = 90;
else if (IsThingModelName(sender, "riv_cndl_dwind.3do"))
bin = 91;
else
return;
if (GetInv(player, bin) < GetInvMax(player, bin))
{
TakeItem(sender, player);
}
else
{
EndCutscene();
}
return;
# -------------------------------------------------------------------
taken:
player = GetSourceRef();
ChangeInv(player, bin, 1.0);
SetInvAvailable(player, bin, 1);
JonesInvItemChanged(bin);
Sleep(1.0);
if (!global10)
{
PlayVoice(player, foundSnd1, 1.0, 0);
global10 = 1;
}
else
{
PlayVoice(player, foundSnd2, 1.0, 0);
}
EndCutscene();
return;
end